﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileSystem
{
    /// <summary>
    /// Global level dependency resolver - to be used when dependency iunjection cannot be used or does not suit well
    /// </summary>
    public static class ServiceLocator
    {
        #region Properties

        /// <summary>
        /// Gets the current service locator.
        /// </summary>
        /// <value>
        /// The current service locator.
        /// </value>
        public static IServiceLocator Current
        {
            get;
            private set;
        }

        #endregion

        #region Methods

        /// <summary>
        /// Sets the current service locator.
        /// </summary>
        /// <param name="currentLocator">The current locator.</param>
        public static void SetCurrentServiceLocator(IServiceLocator currentLocator)
        {
            Current = currentLocator;
        }

        #endregion
    }
}
